package com.hr.system.mapper;

import java.util.List;
import com.hr.system.domain.SysLeave;
import org.apache.ibatis.annotations.Param;

/**
 * 请假Mapper接口
 * 
 * @author ruoyi
 * @date 2021-03-16
 */
public interface SysLeaveMapper 
{
    /**
     * 查询请假
     * 
     * @param leaveId 请假ID
     * @return 请假
     */
    public SysLeave selectSysLeaveById(Long leaveId);

    /**
     * 查询请假列表
     * 
     * @param sysLeave 请假
     * @return 请假集合
     */
    public List<SysLeave> selectSysLeaveList(SysLeave sysLeave);

    /**
     * 新增请假
     * 
     * @param sysLeave 请假
     * @return 结果
     */
    public int insertSysLeave(SysLeave sysLeave);

    /**
     * 修改请假
     * 
     * @param sysLeave 请假
     * @return 结果
     */
    public int updateSysLeave(SysLeave sysLeave);

    /**
     * 删除请假
     * 
     * @param leaveId 请假ID
     * @return 结果
     */
    public int deleteSysLeaveById(Long leaveId);

    /**
     * 批量删除请假
     * 
     * @param leaveIds 需要删除的数据ID
     * @return 结果
     */
    int deleteSysLeaveByIds(String[] leaveIds);

    /***
     * @description: 提交请假申请
     * @param leaveId
     * @return: 结果
     * @author: tanglei
     * @time: 2021/3/18 16:43
     */
    int approval(@Param("leaveId") long leaveId);

    /***
     * @description: 领导通过请假申请
     * @param leaveId
     * @return: int
     * @author: tanglei
     * @time: 2021/3/18 16:43
     */
    int leaderApproval(@Param("leaveId") long leaveId);
}
